import request from '@/utils/request';

/**
 * @param id 要关注的用户ID
 */
export function isFollow(id: number | string) {
  return request({
    url: '/follow/' + id,
    method: 'get',
  })
}

/**
 * @param id 要关注的用户ID
 */
export function followUser(followId: number | string, isFollow: boolean) {
  return request({
    url: '/follow',
    method: 'post',
    params: {followId: followId, isFollow: isFollow}
  })
}

export function listFollows() {
  return request({
    url: '/follow/list',
    method: 'get',
  })
}